//
//  CBDSampleDetailsCell.m
//  BESTWallpaper
//
//  Created by MAC on 2019/7/24.
//  Copyright © 2019 CarMayor. All rights reserved.
//

#import "CBDSampleDetailsCell.h"

@implementation CBDSampleDetailsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.backgroundColor = UIColor.blackColor;
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        [self taped];
    }];
    
    [self addGestureRecognizer:tap];
}

- (void)taped {

    self.tapedCall();
    if (self.bottomView.isHidden) {
        self.bottomView.hidden = false;
        [UIView animateWithDuration:0.2 animations:^{
            self.bottomView.alpha = 1;
        }];
    }else {
        [UIView animateWithDuration:0.2 animations:^{
            self.bottomView.alpha = 0;
        } completion:^(BOOL finished) {
            self.bottomView.hidden = true;
        }];
    }
}


@end
